Skip to content

feat(react): optimize the number and depth of snapshot#1764

Merged
upupming merged 54 commits intolynx-family:mainfrom
hzy:p/hzy/opt-slot_0
Apr 21, 2026
Merged

feat(react): optimize the number and depth of snapshot#1764
upupming merged 54 commits intolynx-family:mainfrom
hzy:p/hzy/opt-slot_0

Conversation

@hzy
Copy link
Copy Markdown
Collaborator

@hzy hzy commented Sep 17, 2025

Summary by CodeRabbit

  • New Features

    • Introduced SlotV2 and ListSlotV2 slot types for organizing dynamic content.
    • Added support for named slots ($0, $1, etc.) for flexible content injection.
  • Refactor

    • Enhanced snapshot serialization with slot index tracking across rendering and hydration.
    • Improved list rendering architecture with slot-based updates and filtering.
    • Updated transform pipeline to generate slot-aware code patterns.
  • Tests

    • Expanded test coverage for new slot functionality and list rendering scenarios.

See preact changes at: lynx-family/internal-preact#1

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: afd2d6a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@lynx-js/react Minor
@lynx-js/react-rsbuild-plugin Patch
@lynx-js/react-umd Minor
@lynx-js/react-alias-rsbuild-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 17, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces slot index tracking (__slotIndex) to snapshot instances and adds new V2 slot types (SlotV2 and ListSlotV2) throughout the React runtime and transform system. The changes propagate slot indices through opcode generation, patch operations, and snapshot serialization, while updating the transform plugins to emit new dynamic part slot variants and enabling per-slot child filtering in hydration and background snapshot logic.

Changes

Cohort / File(s) Summary
Runtime snapshot and slot types
packages/react/runtime/src/snapshot.ts, packages/react/runtime/src/snapshot/dynamicPartType.ts
Added __slotIndex field to SnapshotInstance and serialization interfaces; extended DynamicPartType enum with SlotV2 and ListSlotV2 members; updated snapshot creation logic to recognize new slot types and support per-child slot indexing.
Background snapshot with slot handling
packages/react/runtime/src/backgroundSnapshot.ts
Added __slotIndex field to BackgroundSnapshotInstance; implemented per-slot child filtering in hydration paths for SlotV2 and ListSlotV2 types; updated InsertBefore patch emissions to include slot index; added error handling for unexpected slot types.
Hydration and patch application
packages/react/runtime/src/hydrate.ts, packages/react/runtime/src/lifecycle/patch/snapshotPatch.ts, packages/react/runtime/src/lifecycle/patch/snapshotPatchApply.ts
Extended InsertBefore patch parameters to include slotIndex; implemented per-slot child node filtering for SlotV2 and ListSlotV2 in hydration; updated patch structure definitions and application to read and assign slot index from patch stream.
Opcode generation with slot index
packages/react/runtime/src/opcodes.ts, packages/react/runtime/src/renderToOpcodes/index.ts
Modified opcode generation to track and propagate __slotIndex from opcodes stream; updated _renderToString to emit slot index with Begin and Text operations; added support for named children via $0-prefixed props; refactored child rendering logic to use slot-aware indexing.
Document creation and slot index
packages/react/runtime/src/document.ts, packages/react/testing-library/src/vitest-global-setup.js
Added optional slotIndex parameter to createElement, createElementNS, and createTextNode; attached slot index to created instances via __slotIndex property during initialization.
Runtime internal exports
packages/react/runtime/src/internal.ts, packages/react/runtime/lazy/internal.js
Introduced three new public exports: __DynamicPartSlotV2, __DynamicPartListSlotV2, and __DynamicPartSlotV2_0 to expose V2 slot functionality to external consumers.
Suspense slot-based children
packages/react/runtime/src/lynx/suspense.ts
Updated Suspense implementation to pass children and fallback via $0 property instead of direct children, aligning with new slot-based content injection pattern.
Runtime test snapshots — basic and lifecycle
packages/react/runtime/__test__/basic.test.jsx, packages/react/runtime/__test__/lifecycle.test.jsx, packages/react/runtime/__test__/lifecycle/reload.test.jsx, packages/react/runtime/__test__/delayed-lifecycle-events.test.jsx
Updated inline snapshot expectations to include __slotIndex metadata on snapshot instances and adjusted snapshot patch arrays to reflect new opcode structure with slot index entries.
Runtime test snapshots — hydration and patch
packages/react/runtime/__test__/hydrate.test.jsx, packages/react/runtime/__test__/snapshotPatch.test.jsx, packages/react/runtime/__test__/renderToOpcodes.test.jsx
Updated hydrate result arrays and patch structures to include additional entries for slot index; adjusted opcode sequences and vnode access patterns to use $0 slot-based property syntax.
Runtime test snapshots — dynamic parts
packages/react/runtime/__test__/snapshot/dynamicPartType.test.jsx
Added comprehensive new test suite covering DynamicPartType.Slot, DynamicPartType.SlotV2, DynamicPartType.ListSlotV2, and DynamicPartType.Children with foreground/background hydration assertions.
Runtime test snapshots — debug and events
packages/react/runtime/__test__/debug/formatPatch.test.ts, packages/react/runtime/__test__/snapshot/event.test.jsx, packages/react/runtime/__test__/snapshot/ref.test.jsx, packages/react/runtime/__test__/lynx/...
Updated snapshot patch formatting, event hydration, and Lynx-specific test expectations to include __slotIndex and adjusted patch array structures.
Testing library test snapshots — general
packages/react/testing-library/src/__tests__/act.test.jsx, packages/react/testing-library/src/__tests__/alog.test.jsx, packages/react/testing-library/src/__tests__/end-to-end.test.jsx, packages/react/testing-library/src/__tests__/lynx.test.jsx
Updated inline snapshot expectations to include __slotIndex metadata in serialized structures and adjusted patch data to reflect new slot-aware operation formats.
Testing library test snapshots — component rendering
packages/react/testing-library/src/__tests__/render.test.jsx, packages/react/testing-library/src/__tests__/renderComponent.test.jsx, packages/react/testing-library/src/__tests__/setState-jsx.test.jsx
Restructured expected rendered output to reflect wrapper/slot-based layout changes; added new test file validating state-driven updates with slot index assertions.
Testing library test snapshots — list rendering
packages/react/testing-library/src/__tests__/list.test.jsx, packages/react/testing-library/src/__tests__/lazy-bundle/index.test.jsx
Updated list-item structure to remove nested wrappers; adjusted element IDs and snapshot references to reflect slot-based rendering; modified wrapper placement relative to content elements.
Transform plugin snapshot generation
packages/react/transform/crates/swc_plugin_snapshot/lib.rs, packages/react/transform/crates/swc_plugin_snapshot/slot_marker.rs
Replaced DynamicPart::Children and DynamicPart::ListChildren with DynamicPart::Slot(Expr, i32) and DynamicPart::ListSlot(Expr, i32); removed dynamic_part_count from DynamicPartExtractor; removed entire slot_marker.rs module; implemented dynamic-part merging and slot-based JSX transformation.
Transform plugin snapshots — slots and children
packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/*
Updated snapshot generation to emit __DynamicPartSlotV2 and __DynamicPartListSlotV2 instead of legacy dynamic part types; replaced children element syntax with $0/$1 prop-based slot injection; restructured snapshot markup accordingly.
Transform plugin list handling
packages/react/transform/crates/swc_plugin_list/lib.rs, packages/react/transform/crates/swc_plugin_list/tests/__swc_snapshots__/lib.rs/*
Added list transformation logic to detect and wrap list elements; updated import of jsx_helpers; introduced list-wrapping visitor; expanded test snapshots for list-in-view scenarios with multiple static-sibling and nested configurations.
Transform snapshot fixtures
packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/slot_marker.rs/*
Removed test data files for deleted slot_marker.rs module (should_not_wrap_dynamic_part.js, should_wrap_dynamic_part.js).
Webpack react-refresh and documentation
packages/webpack/react-refresh-webpack-plugin/test/hotCases/jsx/value/index.jsx, .github/react-transform.instructions.md
Updated JSX value test to normalize dynamic children into $0 props; added GitHub workflow instructions for updating transform snapshot fixtures.
Debug utilities
packages/react/runtime/__test__/utils/debug.js
Updated backgroundSnapshotInstanceToJSON to include __slotIndex in serialized output.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • gaoachao
  • hzy
  • Yradex
  • colinaaa

Poem

🐰 Hopping through slots, new and true,
SlotIndex tracking, fresh and new!
V2 variants dance with every child,
Transform and runtime—perfectly styled,
Snapshots bloom with metadata bright! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.79% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(react): optimize the number and depth of snapshot' accurately describes the primary objective of the changeset, which focuses on optimizing snapshot structures across the React runtime.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Sep 17, 2025

React Example

#7436 Bundle Size — 224.28KiB (+0.41%).

afd2d6a(current) vs 9e149c4 main#7425(baseline)

Bundle metrics  Change 2 changes
                 Current
#7436
     Baseline
#7425
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 34.74% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 179 179
No change  Duplicate Modules 69 69
Change  Duplicate Code 44.5%(+0.04%) 44.48%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#7436
     Baseline
#7425
No change  IMG 145.76KiB 145.76KiB
Regression  Other 78.52KiB (+1.19%) 77.6KiB

Bundle analysis reportBranch hzy:p/hzy/opt-slot_0Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Sep 17, 2025

Web Explorer

#9011 Bundle Size — 898.15KiB (0%).

afd2d6a(current) vs 9e149c4 main#8999(baseline)

Bundle metrics  no changes
                 Current
#9011
     Baseline
#8999
No change  Initial JS 44.47KiB 44.47KiB
No change  Initial CSS 2.22KiB 2.22KiB
Change  Cache Invalidation 0% 0.24%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 230 230
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.21% 27.21%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9011
     Baseline
#8999
No change  JS 494.3KiB 494.3KiB
No change  Other 401.63KiB 401.63KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch hzy:p/hzy/opt-slot_0Project dashboard


Generated by RelativeCIDocumentationReport issue

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Sep 17, 2025

Merging this PR will degrade performance by 22.68%

❌ 13 regressed benchmarks
✅ 68 untouched benchmarks
⏩ 26 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
003-hello-list-hydrate 9.1 ms 10.5 ms -13.74%
006-static-raw-text-renderBackground 3.2 ms 3.4 ms -5.59%
003-hello-list__main-thread-transferRoot 186.7 µs 214.1 µs -12.81%
003-hello-list__main-thread-serializeRoot 4.1 ms 4.4 ms -6.87%
003-hello-list__main-thread-componentAtIndex__reuse 3.3 ms 3.5 ms -7.22%
002-hello-reactLynx__main-thread-serializeRoot 561.4 µs 618.1 µs -9.18%
002-hello-reactLynx-destroyBackground 678.7 µs 824.4 µs -17.67%
002-hello-reactLynx-hydrate 1.6 ms 1.8 ms -10.92%
006-static-raw-text__main-thread-serializeRoot 984.6 µs 1,112.6 µs -11.51%
007-four-layer-views-hydrate 123.4 ms 141.6 ms -12.81%
007-four-layer-views__main-thread-transferRoot 909.3 µs 1,176 µs -22.68%
007-four-layer-views-renderBackground 265.9 ms 282.1 ms -5.74%
007-four-layer-views__main-thread-serializeRoot 68.5 ms 78.3 ms -12.5%

Comparing hzy:p/hzy/opt-slot_0 (afd2d6a) with main (9e149c4)

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Comment thread packages/react/transform/crates/swc_plugin_snapshot/slot_marker.rs
@upupming
Copy link
Copy Markdown
Collaborator

upupming commented Sep 22, 2025

I think we can safely remove wrapper from the initial value snapshotManager.values because we will never produce jsxDev('wrapper') now!

[
'wrapper',
{
create() {
/* v8 ignore start */
if (__JS__ && !__DEV__) {
return [];
}
/* v8 ignore stop */
return [__CreateWrapperElement(__pageId)];
},
update: [],
slot: __DynamicPartChildren_0,
isListHolder: false,
},
],


It seems we cannot remove this since we want to be compatible with lower version lazy bundle.

Comment thread packages/react/runtime/src/snapshot.ts Outdated
Comment thread packages/react/runtime/__test__/basic.test.jsx
Comment thread packages/react/runtime/lazy/internal.js
Comment thread packages/react/runtime/src/snapshot/snapshot.ts
Comment thread packages/react/runtime/src/lifecycle/patch/snapshotPatchApply.ts Outdated
Comment thread packages/react/transform/src/swc_plugin_snapshot/mod.rs Outdated
Comment thread packages/react/transform/crates/swc_plugin_snapshot/lib.rs
Comment thread packages/react/runtime/__test__/preact.test.jsx Outdated
@upupming upupming requested a review from Sherry-hue as a code owner April 16, 2026 12:31
@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 16, 2026

React External

#554 Bundle Size — 582.19KiB (+0.31%).

afd2d6a(current) vs 9e149c4 main#542(baseline)

Bundle metrics  Change 1 change
                 Current
#554
     Baseline
#542
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 98.34% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#554
     Baseline
#542
Regression  Other 582.19KiB (+0.31%) 580.37KiB

Bundle analysis reportBranch hzy:p/hzy/opt-slot_0Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 16, 2026

React MTF Example

#569 Bundle Size — 195.44KiB (+0.76%).

afd2d6a(current) vs 9e149c4 main#557(baseline)

Bundle metrics  Change 2 changes
                 Current
#569
     Baseline
#557
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 42.65% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 173 173
No change  Duplicate Modules 66 66
Change  Duplicate Code 43.98%(+0.09%) 43.94%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#569
     Baseline
#557
No change  IMG 111.23KiB 111.23KiB
Regression  Other 84.2KiB (+1.78%) 82.73KiB

Bundle analysis reportBranch hzy:p/hzy/opt-slot_0Project dashboard


Generated by RelativeCIDocumentationReport issue

@upupming upupming merged commit cffd0b1 into lynx-family:main Apr 21, 2026
74 of 80 checks passed
colinaaa pushed a commit that referenced this pull request Apr 26, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/react@0.120.0

### Minor Changes

- Bump `@lynx-js/internal-preact` from `10.28.4-dfff9aa` to
`10.29.1-20260424024911-12b794f`
([diff](lynx-family/internal-preact@10.28.4-dfff9aa...10.29.1-20260424024911-12b794f)).
([#2512](#2512))

Fixes wrong DOM order when a keyed child moves to a different `$N` slot
across a re-render. Cross-slot moves now land at the correct slot
position instead of being appended past stable siblings.

- Refactor preact to support multi-slots children and reduce the number
and depth of snapshot.
([#1764](#1764))

### Patch Changes

- Fix stale callback-local references when transforming JSX inside
`children={array.map(...)}` prop expressions.
([#2524](#2524))

- Fix ref callbacks not being cleaned up or re-applied correctly when
the ref at the same element slot changes across rerenders that happen
before hydration (e.g. a `useEffect` triggering `setState` during the
initial background render).
([#2500](#2500))

- fix: reduce redundant updates for main-thread handlers and gestures
([#2188](#2188))

- Updates are faster when the main-thread event handler or gesture
object is stable across rerenders (fewer unnecessary native updates).
- Spread props rerenders that don't semantically change the
handler/gesture no longer trigger redundant updates.
- Removing a gesture from spread props reliably clears the gesture state
on the target element.

- Fix hydration edge cases by tolerating serialized snapshot nodes with
missing `values`
([#2481](#2481))

- Keep ReactLynx Testing Library imports aligned with the contained
snapshot runtime paths.
([#2498](#2498))

## @lynx-js/template-webpack-plugin@0.11.0

### Minor Changes

- Add CSS source map support and source-mapped template encode
diagnostics.
([#2483](#2483))

### Patch Changes

- fix: genStyleInfo should also preserve CSS variable fallback values
when encoding web-core stylesheets so declarations like `var(--token,
rgba(...))` are emitted with their fallback intact.
([#2502](#2502))

- Updated dependencies
\[[`e179680`](e179680),
[`8352530`](8352530),
[`30f0277`](30f0277),
[`887b8aa`](887b8aa),
[`1d4abfc`](1d4abfc),
[`25e196b`](25e196b),
[`fb7bc84`](fb7bc84),
[`9e149c4`](9e149c4),
[`30f0277`](30f0277),
[`9e149c4`](9e149c4)]:
    -   @lynx-js/css-serializer@0.1.6
    -   @lynx-js/web-core@0.20.3

## @lynx-js/i18next-translation-dedupe@0.0.1

### Patch Changes

- Introduce `@lynx-js/i18next-translation-dedupe` package to avoid
bundling i18next translations twice in Lynx apps.
([#2482](#2482))

The package reads translations extracted by
`rsbuild-plugin-i18next-extractor`, skips the extractor's default
rendered asset, and writes the translations into the Lynx bundle custom
section:

    ```json
    {
      "customSections": {
        "i18next-translations": {
          "content": {
            "en-US": {
              "hello": "Hello"
            },
            "zh-CN": {
              "hello": "你好"
            }
          }
        }
      }
    }
    ```

## @lynx-js/docs-mcp-server@0.2.2

### Patch Changes

- Fix Windows startup error.
([#2474](#2474))

## @lynx-js/react-umd@0.120.0

### Patch Changes

- Support compile main-thread script to bytecode in external bundle
([#2459](#2459))

## @lynx-js/rspeedy@0.14.3

### Patch Changes

- add a `sourceMap.css` option to emit CSS sourcemaps.
([#2442](#2442))

By default, `sourceMap.css` is false. You can set it to true to emit CSS
sourcemaps.

    ```js
    import { defineConfig } from "@lynx-js/rspeedy";

    export default defineConfig({
      output: {
        sourceMap: {
          css: true,
        },
      },
    });
    ```

- bump rsdoctor to 1.5.6
([#2410](#2410))

- Enable CSS source maps by default in Rspeedy output config.
([#2483](#2483))

- Prefer physical routable IPv4 addresses over tunnel and link-local
interfaces when resolving the dev host IP for generated preview and
bundle URLs.
([#2409](#2409))

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.20.3

## @lynx-js/lynx-bundle-rslib-config@0.3.2

### Patch Changes

- Support compile main-thread script to bytecode in external bundle
([#2459](#2459))

- Updated dependencies
\[[`e179680`](e179680)]:
    -   @lynx-js/css-serializer@0.1.6

## @lynx-js/react-rsbuild-plugin@0.16.1

### Patch Changes

- Respect `dev.hmr: false` when installing React Refresh integrations so
disabled HMR no longer injects the refresh loader or plugin.
([#2487](#2487))

- Fix stale callback-local references when transforming JSX inside
`children={array.map(...)}` prop expressions.
([#2524](#2524))

- Supports @lynx-js/react 0.120.0
([#1764](#1764))

- Updated dependencies
\[[`e179680`](e179680),
[`13655ac`](13655ac),
[`f15494b`](f15494b),
[`e179680`](e179680),
[`e179680`](e179680)]:
    -   @lynx-js/template-webpack-plugin@0.11.0
    -   @lynx-js/css-extract-webpack-plugin@0.7.1
    -   @lynx-js/react-webpack-plugin@0.9.2
    -   @lynx-js/react-alias-rsbuild-plugin@0.16.1
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-refresh-webpack-plugin@0.3.5

## @lynx-js/css-serializer@0.1.6

### Patch Changes

- Add CSS source map support and source-mapped template encode
diagnostics.
([#2483](#2483))

## @lynx-js/web-core@0.20.3

### Patch Changes

- fix: `__AddClass` triggers style updates when `enableCSSSelector` is
`false` ([#2515](#2515))

`__AddClass` was missing the expected call to `update_css_og_style` when
CSS selectors are disabled (`enableCSSSelector: false`). With this fix,
dynamically adding a class correctly delegates style population from the
template AST into the DOM, mirroring the behavior of `__SetClasses`.

Added behavioral unit test and end-to-end playwright validations using
dynamically generated JSON AST `styleInfo` mocks.

- fix(web-core): skip setting lynxEntryNameAttribute for **Card** and
use constants for server element APIs
([#2510](#2510))

- Fix componentCSSID behavior for SSR and main thread by calculating
element css_id from parent component correctly.
([#2495](#2495))

- fix: avoid panic in dispatch_event_by_path when element data cannot be
retrieved ([#2508](#2508))

- fix: filter out -1 uniqueId in commonEventHandler
([#2493](#2493))

- feat: add x-markdown support
([#2412](#2412))

Add opt-in support for the `x-markdown` element on Lynx Web, including
Markdown rendering together with its related styling, interaction,
animation,
truncation, range rendering, and effect capabilities exposed through the
    component API.

Update the `web-core`, `web-core-wasm`, and `web-mainthread-apis`
runtime
paths to use the shared property-or-attribute setter from
`web-constants`, so
custom elements such as `x-markdown` can receive structured property
values
correctly instead of being forced through string-only attribute updates.

    ```javascript
    import "@lynx-js/web-elements/XMarkdown";
    ```

- fix: transformVH not work with cqw unit as the base length
([#2469](#2469))

- fix: add cardType resolution for legacy json lynx bundle
([#2510](#2510))

- fix: the default value of rpx is supposed to be 1/750 cqw
([#2469](#2469))

- Updated dependencies
\[[`e179680`](e179680),
[`647334c`](647334c),
[`fb7bc84`](fb7bc84),
[`9454dc4`](9454dc4),
[`bdec498`](bdec498),
[`b0247f9`](b0247f9),
[`eec539a`](eec539a)]:
    -   @lynx-js/css-serializer@0.1.6
    -   @lynx-js/web-elements@0.12.1
    -   @lynx-js/web-worker-rpc@0.20.3

## @lynx-js/web-elements@0.12.1

### Patch Changes

- fix: XMarkdown slot created should not have prefix
([#2520](#2520))

- feat: add x-markdown support
([#2412](#2412))

Add opt-in support for the `x-markdown` element on Lynx Web, including
Markdown rendering together with its related styling, interaction,
animation,
truncation, range rendering, and effect capabilities exposed through the
    component API.

Update the `web-core`, `web-core-wasm`, and `web-mainthread-apis`
runtime
paths to use the shared property-or-attribute setter from
`web-constants`, so
custom elements such as `x-markdown` can receive structured property
values
correctly instead of being forced through string-only attribute updates.

    ```javascript
    import "@lynx-js/web-elements/XMarkdown";
    ```

- fix: x-markdown inline view injection no longer queries light DOM
children when the content attribute changes. Consumers must now pre-set
`slot="{id}"` on the child element they want to project into
`inlineview://{id}`.
([#2516](#2516))

- fix: list cannot drag-scroll inside x-foldview-slot-ng
([#2507](#2507))

Cause: `touchstart` used `elementsFromPoint(pageX, pageY)` (expects
`clientX/clientY`), so hit-testing can miss the real inner scroller
(e.g. `x-list` shadow `#content`) when the document is scrolled.

Fix: use `elementsFromPoint(clientX, clientY)` + `event.composedPath()`
for Shadow DOM, and keep `previousPageX` updated during `touchmove`.

- fix: line-height of markdown-style should be added `px`
([#2509](#2509))

- fix: list `bindscrolltolower` may not trigger because the lower
threshold ([#2484](#2484))
    sentinel had no effective size or offset, causing the bottom
    `IntersectionObserver` to miss the list boundary

## @lynx-js/web-explorer@0.0.17

### Patch Changes

- bump rsdoctor to 1.5.6
([#2410](#2410))

## @lynx-js/css-extract-webpack-plugin@0.7.1

### Patch Changes

- Fix CSS source map line offsets when wrapping extracted CSS with cssId
metadata. ([#2514](#2514))

- Support `@lynx-js/template-webpack-plugin` v0.11.0.
([#2483](#2483))

## @lynx-js/react-webpack-plugin@0.9.2

### Patch Changes

- Support `@lynx-js/template-webpack-plugin` v0.11.0.
([#2483](#2483))

## create-rspeedy@0.14.3



## @lynx-js/react-alias-rsbuild-plugin@0.16.1



## upgrade-rspeedy@0.14.3



## @lynx-js/web-rsbuild-server-middleware@0.20.3



## @lynx-js/web-worker-rpc@0.20.3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Inactive for 30 days. Will be closed by bots.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants